<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get the clipping rectangle</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.imagegetclip" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagegetclip</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0)</p><p class="refpurpose"><span class="refname">imagegetclip</span> &mdash; <span class="dc-title">Get the clipping rectangle</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.imagegetclip-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagegetclip</strong></span>
   
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$im</code></span>
   ) : <span class="type">array</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>imagegetclip()</strong></span> retrieves the current clipping rectangle,
   i.e. the area beyond which no pixels will be drawn.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imagegetclip-parameters">
  <h3 class="title">参数</h3>
  <dl>

   <dt>
<code class="parameter">image</code></dt>

<dd>
<p class="para">由图象创建函数(例如<span class="function"><a href="imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a></span>)返回的图象资源。</p></dd>

  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imagegetclip-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The function returns an indexed array with the coordinates of the clipping
   rectangle which has the following entries:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">x-coordinate of the upper left corner</span>
    </li>
    <li class="listitem">
     <span class="simpara">y-coordinate of the upper left corner</span>
    </li>
    <li class="listitem">
     <span class="simpara">x-coordinate of the lower right corner</span>
    </li>
    <li class="listitem">
     <span class="simpara">y-coordinate of the lower right corner</span>
    </li>
   </ul>
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.imagegetclip-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-3711">
   <p><strong>Example #1 <span class="function"><strong>imagegetclip()</strong></span> example</strong></p>
   <div class="example-contents"><p>
     Setting and retrieving the clipping rectangle.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreate</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagesetclip</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">10</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">89</span><span style="color: #007700">,</span><span style="color: #0000BB">89</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">imagegetclip</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">));</span>
</span>
</pre></div>
   </div>

   <div class="example-contents"><p>以上例程会输出：</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; 10
    [1] =&gt; 10
    [2] =&gt; 89
    [3] =&gt; 89
)
</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.imagegetclip-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="imagesetclip.html" class="function" rel="rdfs-seeAlso">imagesetclip()</a> - Set the clipping rectangle</span></li>
  </ul>
 </div>


</div></div></div></body></html>